﻿package com.obas.type
{
	import com.ease.common.enums.OptionalEnum;
	import com.ease.lang.Enum;
	import com.ease.lang.EnumConstants;
	import com.obas.type.EntityObjectType;

	[Bindable]
	[RemoteClass(alias="com.obas.type.EntityObjectType")]

	public class EntityObjectType extends Enum
	{
		/* static init */
		{ initEnum(EntityObjectType); }

		/* Constants */
		public static const SystemProject:EntityObjectType = new EntityObjectType("SystemProject", 1, "SystemProject");
		public static const SystemScenario:EntityObjectType = new EntityObjectType("SystemScenario", 2, "SystemScenario");
		public static const SystemUsecase:EntityObjectType = new EntityObjectType("SystemUsecase", 3, "SystemUsecase");
		public static const SystemFunction:EntityObjectType = new EntityObjectType("SystemFunction", 4, "SystemFunction");
		public static const TestcaseScript:EntityObjectType = new EntityObjectType("TestcaseScript", 5, "TestcaseScript");
		public static const BusinessRepository:EntityObjectType = new EntityObjectType("BusinessRepository", 6, "BusinessRepository");
		public static const BusinessScenario:EntityObjectType = new EntityObjectType("BusinessScenario", 7, "BusinessScenario");
		public static const BusinessUsecase:EntityObjectType = new EntityObjectType("BusinessUsecase", 8, "BusinessUsecase");
		public static const BusinessFunction:EntityObjectType = new EntityObjectType("BusinessFunction", 9, "BusinessFunction");

		private var _value:int;
		private var _text:String;

		public function EntityObjectType(name:String=null ,value:int=0 ,text:String=null) {
			super.name = name;
			this._value = value;
			this._text = text;
		}

		public function get value():int  { return this._value; }
		public function get text():String  { return this._text; }

		/* constant query */
		public static function getEnumConstants():Array {
			return Enum.getEnumConstants(EntityObjectType);
		}

		public static function get(constantName:String, caseSensitive:Boolean = false):EntityObjectType {
			return EntityObjectType(Enum.get(EntityObjectType, constantName, caseSensitive));
		}
	}
}